package com.info33.platform.system.entity;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.info33.platform.common.mvc.entity.BaseEntity;
import com.info33.platform.system.dto.SysUserProfileDTO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.Null;

/**
 * 系统 - 用户 - 资料
 *
 * @author admin
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class SysUserProfile extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "用户 id【sys_user】")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long userId;

    @ApiModelProperty(value = "真实姓名")
    private String trueName;

    @ApiModelProperty(value = "昵称")
    private String nickName;

    @ApiModelProperty(value = "头像 url")
    private String headImg;

    @Null(groups = {SysUserProfileDTO.IdCardNeedNull.class}, message = "身份证相关信息必须为空")
    @ApiModelProperty(value = "身份证号")
    private String idCard;

    @Null(groups = {SysUserProfileDTO.IdCardNeedNull.class}, message = "身份证相关信息必须为空")
    @ApiModelProperty(value = "身份证正面")
    private String idCardFront;

    @Null(groups = {SysUserProfileDTO.IdCardNeedNull.class}, message = "身份证相关信息必须为空")
    @ApiModelProperty(value = "身份证反面")
    private String idCardBack;

    @Null(groups = {SysUserProfileDTO.IdCardNeedNull.class}, message = "身份证相关信息必须为空")
    @ApiModelProperty(value = "身份证手持")
    private String idCardHand;

    @ApiModelProperty(value = "电子邮箱")
    private String email;

    @ApiModelProperty(value = "民族 id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long nationId;

    @ApiModelProperty(value = "民族")
    private String nation;

    @ApiModelProperty(value = "学历 id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long educationId;

    @ApiModelProperty(value = "学历")
    private String education;

    @ApiModelProperty(value = "政治面貌 id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long politicsStatusId;

    @ApiModelProperty(value = "政治面貌")
    private String politicsStatus;

    @ApiModelProperty(value = "传真号")
    private String fax;

    @ApiModelProperty(value = "邮政编码")
    private String zipCode;

    @ApiModelProperty(value = "农友圈背景")
    private String dynamicImg;

    @ApiModelProperty(value = "地址：省 id")
    @TableField(updateStrategy = FieldStrategy.IGNORED, insertStrategy = FieldStrategy.IGNORED)
    private String provinceId;

    @ApiModelProperty(value = "地址：市 id")
    @TableField(updateStrategy = FieldStrategy.IGNORED, insertStrategy = FieldStrategy.IGNORED)
    private String cityId;

    @ApiModelProperty(value = "地址：区 id")
    @TableField(updateStrategy = FieldStrategy.IGNORED, insertStrategy = FieldStrategy.IGNORED)
    private String districtId;

    @ApiModelProperty(value = "地址：街道 id")
    @TableField(updateStrategy = FieldStrategy.IGNORED, insertStrategy = FieldStrategy.IGNORED)
    private String streetId;

    @ApiModelProperty(value = "地址：省|市|区|街道|详细地址（分割符分割）")
    private String address;

}